<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/cookies.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<style type="text/css">
			.box {
				width: 600px;
				margin: 50px auto;
				border: 1px solid red;
			}
		</style>
		<div class="box">
			<label for="">账号：</label><input class="username" type="text" /><br />
			<label for="">密码：</label><input class="pwd" type="password" />
			<button>记住密码</button>
		</div>
		<script type="text/javascript">
			var cookie_arr = CookieUtil.getAll('account_password');
			$('.username').val(cookie_arr[0]);
			$('.pwd').val(cookie_arr[1]);
			
			
			$('button').on('click', function() {
				var username = $('.username').val();
				var pwd = $('.pwd').val();
				var account_password = [];
				account_password.push(username);
				account_password.push(pwd);
				var login = CookieUtil.setAll('account_password', account_password);
			})
			
			
		</script>
	</body>

</html>